import React, { Component } from 'react'
import { Table, Card } from 'antd'

const columns = [
  {
    title: '菜单名称',
    dataIndex: 'name',
    key: 'name',
  },
  {
    title: '图标',
    dataIndex: 'icon',
    key: 'icon',
  },
  {
    title: '路由地址',
    dataIndex: 'pathname',
    key: 'pathname'
  },
  {
    title: '项目路径',
    dataIndex: 'url',
    key: 'url',
  },
];

const data = [
  {
    key: 2,
    name: '首页',
    icon: 'icon-shouye',
    url: '../pages/Home',
    pathname: '/admin/home'
  },
  {
    key: 1,
    name: '设置',
    icon: 'icon-shezhi',
    url: '../pages/Home',
    pathname: '/admin/setting',
    children: [
      {
        key: 11,
        name: '菜单设置',
        pathname: '/admin/setting/menusetting',
        icon: 'icon-shezhi',
        url: '../pages/Home',
      },
      {
        key: 12,
        name: '用户设置',
        icon: 'icon-shezhi',
        pathname: '/admin/setting/usersetting',
        url: '../pages/Home',
      },
    ],
  }
];

class MenuSetting extends Component {
  render() {
    return (
      <Card title="菜单管理" bordered={false}>
        <Table columns={columns} dataSource={data} />
      </Card>
    )
  }
}

export default MenuSetting
